const express = require('express')

const router = express.Router()


// 验证数据合法性的中间件
const expressJoi = require('@escook/express-joi')

const {add_cate_schema,delete_cate_schma} = require('../schema/artcate')

const artcate_handler = require('../router_handler/artcate')

router.get('/catesinfo',artcate_handler.getArtcate)


router.post('/addArtcate',expressJoi(add_cate_schema),artcate_handler.addArtcate)

router.delete('/deleteArtcate/:id',expressJoi(delete_cate_schma),artcate_handler.deleteArtcate)


module.exports = router